
import { DataTypes } from 'sequelize'
import seq from '@/mysql/db/seq.db'

// 创建数据库模型 工作类型
const GongzuoleixingTable2 = seq.define(
  'gongzuoleixing_table2',
  {
    table_id: {
        type: DataTypes.BIGINT,
        allowNull: false,
        unique: true,
        autoIncrement: true,
        primaryKey: true,
        comment: "编号"
      },
    work_type_value: {
        type: DataTypes.INTEGER,
        defaultValue:null,
        comment: "工作类型v"
      },
    work_type_label: {
        type: DataTypes.CHAR,
        defaultValue:'',
        comment: "工作类型名称"
      },
    name: {
        type: DataTypes.CHAR,
        defaultValue:'',
        comment: "名称"
      },
    code: {
        type: DataTypes.CHAR,
        defaultValue:'',
        comment: "编码"
      },
    create_by: {
        type: DataTypes.CHAR,
        defaultValue:'',
        comment: "创建者"
      },
    update_by: {
        type: DataTypes.CHAR,
        defaultValue:'',
        comment: "更新者"
      },
    created_at: {
        type: DataTypes.DATE,
        defaultValue:'',
        comment: ""
      },
    filed1: {
        type: DataTypes.STRING,
        defaultValue:'',
        comment: "预留字段1"
      },
    updated_at: {
        type: DataTypes.DATE,
        defaultValue:'',
        comment: ""
      },
    filed2: {
        type: DataTypes.STRING,
        defaultValue:'',
        comment: "预留字段2"
      },

  },
  {
    tableName: 'gongzuoleixing_table2', // 强制创建表名
    freezeTableName: true, // 告诉sequelize不需要自动将表名变成复数
    comment: '工作类型'
  }
)

export default GongzuoleixingTable2